package com.trkj.service;

import com.trkj.dao.CarSelectDao;
import com.trkj.dao.selectYardandCarDao;
import com.trkj.entity.CarInfoEntity;
import com.trkj.entity.selectYardandCarEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SelectCarServiceImpl implements SelectCarService{
    @Autowired
    private CarSelectDao carSelectDao;

    @Autowired
    private selectYardandCarDao selectYardandCarDao;

    @Override
    public List<CarInfoEntity> selectCarInfo(){
        List<CarInfoEntity> list=carSelectDao.selectCarInfo();
        return list;
    }

    @Override
    public boolean insertCar(CarInfoEntity carInfoEntity){
        int count=carSelectDao.insertCar(carInfoEntity);
        return count>0;
    }

    @Override
    public List<selectYardandCarEntity> selectYardandCar(){
        List<selectYardandCarEntity> list=selectYardandCarDao.selectYardandCar();
        return list;
    }

}
